package cc.autoapi.pucong.auto.flow.core.qlexpress.enumSelf;

public enum NodeTypeEnum {
    变量("variable", "选择的变量"),
    比较符("compare", "比较符号"),
    变量赋值("setValue", "变量赋值"),

    ;

    private String code;
    private String desc;

    private NodeTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static NodeTypeEnum getEnumByCode(String code) {
        for (NodeTypeEnum e : NodeTypeEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }
}
